package com.itheima.dao;

import com.itheima.pojo.Role;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Set;

public interface RoleDao {
    @Select("select * from t_role")
    public List<Role> findAll();

    @Select("select * from t_role r,t_role_permission rp where r.id = rp.role_id and rp.permission_id = #{id}")
    public Set<Role> findRoleByPermission(int id);
}
